package com.dev;
import android.graphics.Canvas;
import android.graphics.Path;
import android.graphics.Paint;
public class IconViewArrow extends IconView{
	boolean left;
    IconViewArrow(MainActivity ma,boolean left){
		super(ma);
		this.left=left;
	}
	@Override
	protected void onDraw(Canvas canvas) {
		int vw=getWidth();
		int vh=getHeight();
		int paddingVer=vh/5;
		int cy=vh/2;
		int ct=paddingVer;
		int cb=vh-paddingVer;
		int cw=(cb-ct)/2;
		int cl=(vw-cw)/2;
		int cr=cl+cw;
		Path path=new Path();
		if(left){
			path.moveTo(cr,ct);
			path.lineTo(cl,cy);
			path.lineTo(cr,cb);
		}else{
			path.moveTo(cl,ct);
			path.lineTo(cr,cy);
			path.lineTo(cl,cb);
		}
		Paint p=new Paint();
		p.setStyle(Paint.Style.STROKE);
		p.setStrokeWidth(vh/10);
		canvas.drawPath(path,p);
	}
}
